package com.chixing.day10.day10_Homew;

import java.util.Objects;

public class Job {
  private int jobId;
  private String jobName;
  private Company company;
  private float minSalary;
  private float maxSalary;
  private String jobAddress;
  private String jobDegree;

  public int getJobId() {
    return jobId;
  }

  public void setJobId(int jobId) {
    this.jobId = jobId;
  }

  public String getJobName() {
    return jobName;
  }

  public void setJobName(String jobName) {
    this.jobName = jobName;
  }

  public Company getCompany() {
    return company;
  }

  public void setCompany(Company company) {
    this.company = company;
  }

  public float getMinSalary() {
    return minSalary;
  }

  public void setMinSalary(float minSalary) {
    this.minSalary = minSalary;
  }

  public float getMaxSalary() {
    return maxSalary;
  }

  public void setMaxSalary(float maxSalary) {
    this.maxSalary = maxSalary;
  }

  public String getJobAddress() {
    return jobAddress;
  }

  public void setJobAddress(String jobAddress) {
    this.jobAddress = jobAddress;
  }

  public String getJobDegree() {
    return jobDegree;
  }

  public void setJobDegree(String jobDegree) {
    this.jobDegree = jobDegree;
  }
  public Job(){

  }

  public Job(int jobId, String jobName, Company company, float minSalary, float maxSalary, String jobAddress, String jobDegree) {
    this.jobId = jobId;
    this.jobName = jobName;
    this.company = company;
    this.minSalary = minSalary;
    this.maxSalary = maxSalary;
    this.jobAddress = jobAddress;
    this.jobDegree = jobDegree;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {return true;}
    if (o == null || getClass() != o.getClass()) {return false;}
    Job job = (Job) o;
    return jobId == job.jobId;
  }

  @Override
  public int hashCode() {
    return Objects.hash(jobId);
  }
}
